<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/djlc/cw_djlc_jgwh.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/djlc/cw_djlc_jgwh.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'cw_djlc_jgwh_id',
                footer: "Foots",
                cnName: '采购价格维护主表',
                name: 'djlc/cw_djlc_jgwh',
                url: "/cw_djlc_jgwh/",
                sortName: "createdate"
            });
            const editFormFields = ref({"codename":"","decrease":"","rabate":"","rebateconditions":"","effectivedatestart":"","effectivedateend":""});
            const editFormOptions = ref([[{"title":"代码","field":"codename"}],
                              [{"title":"降幅","field":"decrease","type":"decimal"}],
                              [{"title":"返利","field":"rabate","type":"decimal"}],
                              [{"title":"返利条件","field":"rebateconditions"}],
                              [{"title":"价格有效期开始","field":"effectivedatestart","type":"datetime"}],
                              [{"title":"价格有效期结束","field":"effectivedateend","type":"datetime"}]]);
            const searchFormFields = ref({"codename":"","decrease":"","rabate":"","rebateconditions":""});
            const searchFormOptions = ref([[{"title":"代码","field":"codename"},{"title":"降幅","field":"decrease","type":"decimal"},{"title":"返利","field":"rabate","type":"decimal"},{"title":"返利条件","field":"rebateconditions"}]]);
            const columns = ref([{field:'codename',title:'代码',type:'string',width:110,align:'left',sort:true},
                       {field:'decrease',title:'降幅',type:'decimal',width:110,align:'left'},
                       {field:'rabate',title:'返利',type:'decimal',width:110,align:'left'},
                       {field:'cw_djlc_jgwh_id',title:'价格维护表',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'status',title:'状态',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'Creator',title:'创建人',type:'string',width:130,align:'left'},
                       {field:'Modifier',title:'修改人',type:'string',width:130,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'effectivedatestart',title:'价格有效期开始',type:'datetime',width:120,align:'left',sort:true},
                       {field:'effectivedateend',title:'价格有效期结束',type:'datetime',width:120,align:'left',sort:true},
                       {field:'rebateconditions',title:'返利条件',type:'string',width:120,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
